home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Newbie doesn't understand compiler error
- Date: 1 Mar 1996 20:43:58 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4h8cle$cn4@solutions.solon.com>
- References: <Pine.SUN.3.91.960301153010.11258B-100000@pioneer.uspto.gov> <31378ECB.3B81@oc.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <31378ECB.3B81@oc.com>, Larry Weiss <lfw@oc.com> wrote:
- > > int line, page;
- > > main( int argv, char *argc[] ) <<- Compiler states "Syntax error at or near
- > > { word type char."
-
- > > Do I need to update my compiler?
-
- This is in the FAQ, of course... And the answer is "yes".
-
- >First off, you may have made a typo here, but the correct declaration of
- >main() is
-
- > main( int argc, char *argv[] )
- > ^ ^
-
- Now, now. There's nothing *wrong* with the newbie's definition.
- Sure, it's stupid, unconventional, misleading, and a likely
- typo. But there's nothing *wrong* with it.
-
- >The compiler that Sun provides with SUNOS 4.1 does not support function
- >declarations of the type you are using. This method was introduced into
- >the language at the most recent major standardization cycle.
-
- Which is to say, it was formalized by 1988-1989 or so, and Sun is a
- fascist bunch of evil !@#*!#'s not to have fixed it.
-
- > main( argc, argv )
- > int argc;
- > char *argv[];
- > {
- > ...
- > }
-
- This will work also. :)
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-